package cn.zn.modules.money.cur.entity;

import cn.zn.framework.common.abs.AbsOldMainEntity;
import cn.zn.modules.money.enums.MoneyTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "t_money_info_detail_freezs")
public class TMoneyInfoDetailFreezs extends AbsOldMainEntity {

    @TableField(value = "MONEY_")
    private Double money;

    @TableField(value = "PROCESS_CODE_")
    private String processCode;

    @TableField(value = "STATE_")
    private Integer state;

    /**
     * 预算项目编号
     */
    @TableField(value = "PROJECT_CODE")
    private String projectCode;

    /**
     * 经济分类编号
     */
    @TableField(value = "CATE_CODE")
    private String cateCode;

    /**
     * 经费类型
     */
    @TableField(value = "MONEY_TYPE_CODE")
    private String moneyTypeCode;

    /**
     * 项目名称
     */
    @TableField(exist = false)
    private String projectName;

    /**
     * 经济分类名称
     */
    @TableField(exist = false)
    private String cateName;

    public String getMoneyTypeName(){
        return MoneyTypeEnum.findByCode(this.getMoneyTypeCode()).getName();
    }

    /**
     * 单据编号
     */
    @TableField(exist = false)
    private String applyCode;

    /**
     * 单据标题
     */
    @TableField(exist = false)
    private String title;
}